<template>
  <div>
    <!-- <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
      <template v-for="(item, index) in routrList" :key="index">
        <el-tab-pane :label="item.label" :name="item.name">
          <router-view></router-view>
        </el-tab-pane>
      </template>
    </el-tabs> -->
    <router-view></router-view>

  </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
// 路由数据
const routrList = ref([
  {
    path: '/user',
    name: 'User',
    label: '用户管理'
  },
  {
    path: '/role',
    name: 'Role',
    label: '角色管理'
  },
  {
    path: '/permission',
    name: 'Permission',
    label: '菜单管理'
  }
])
const activeName = ref('')
// 点击tab
const handleClick = (tab: any) => {
  const { name } = tab.props
  const toRouter = routrList.value.find((item) => item.name === name)  
}
onMounted(() => {
  
})
</script>

<style scoped>

</style>